package com.metacube.questionbank.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.metacube.questionbank.dao.UserDAO;
import com.metacube.questionbank.dto.UserDTO;

@Controller
@RequestMapping("user")
public class RetrieveUserDataController {
	
	@Autowired
	UserDAO userDAO;
	
	@RequestMapping(value = "/retrieveUserData")
	@ResponseBody
	public List<UserDTO> retrieveUserData()
	{
		List<UserDTO> userList = userDAO.retrieveDataFromDB();
		
		return userList;
	}

}
